package com.ruoyi.myplayer.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.myplayer.mapper.PlayerSingerMapper;
import com.ruoyi.myplayer.domain.PlayerSinger;
import com.ruoyi.myplayer.service.IPlayerSingerService;

/**
 * 歌手信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-04-10
 */
@Service
public class PlayerSingerServiceImpl implements IPlayerSingerService 
{
    @Autowired
    private PlayerSingerMapper playerSingerMapper;

    /**
     * 查询歌手信息
     * 
     * @param id 歌手信息主键
     * @return 歌手信息
     */
    @Override
    public PlayerSinger selectPlayerSingerById(Long id)
    {
        return playerSingerMapper.selectPlayerSingerById(id);
    }

    /**
     * 查询歌手信息列表
     * 
     * @param playerSinger 歌手信息
     * @return 歌手信息
     */
    @Override
    public List<PlayerSinger> selectPlayerSingerList(PlayerSinger playerSinger)
    {
        return playerSingerMapper.selectPlayerSingerList(playerSinger);
    }

    /**
     * 新增歌手信息
     * 
     * @param playerSinger 歌手信息
     * @return 结果
     */
    @Override
    public int insertPlayerSinger(PlayerSinger playerSinger)
    {
        playerSinger.setCreateTime(DateUtils.getNowDate());
        return playerSingerMapper.insertPlayerSinger(playerSinger);
    }

    /**
     * 修改歌手信息
     * 
     * @param playerSinger 歌手信息
     * @return 结果
     */
    @Override
    public int updatePlayerSinger(PlayerSinger playerSinger)
    {
        return playerSingerMapper.updatePlayerSinger(playerSinger);
    }

    /**
     * 批量删除歌手信息
     * 
     * @param ids 需要删除的歌手信息主键
     * @return 结果
     */
    @Override
    public int deletePlayerSingerByIds(Long[] ids)
    {
        return playerSingerMapper.deletePlayerSingerByIds(ids);
    }

    /**
     * 删除歌手信息信息
     * 
     * @param id 歌手信息主键
     * @return 结果
     */
    @Override
    public int deletePlayerSingerById(Long id)
    {
        return playerSingerMapper.deletePlayerSingerById(id);
    }
}
